package com.sunrise.xdoc.entity.store;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;

import com.sunrise.xdoc.entity.AbstractCodeEntity;

@MappedSuperclass
public abstract class AbstractPhieuKho extends AbstractCodeEntity {
	protected Kho kho;
	protected Date ngayTao;
	protected String thongTin;
	protected String nhanVien;

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "kho_id")
	@NotNull
	public Kho getKho() {
		return kho;
	}

	public void setKho(Kho kho) {
		this.kho = kho;
	}

	@Column(name = "ngay_nhap")
	@NotNull
	public Date getNgayTao() {
		return ngayTao;
	}

	public void setNgayTao(Date ngayNhap) {
		this.ngayTao = ngayNhap;
	}

	@Column(name = "thong_tin")
	public String getThongTin() {
		return thongTin;
	}

	public void setThongTin(String thongTin) {
		this.thongTin = thongTin;
	}

	@Column(name = "nhan_vien")
	public String getNhanVien() {
		return nhanVien;
	}

	public void setNhanVien(String nhanVien) {
		this.nhanVien = nhanVien;
	}

}